package file;

import java.io.File;

public class Demo6 {
    public static void main(String[] args) {
        File f=new File("./test.txt");
        File f2=new File("./test2.txt");
        f.renameTo(f2);//重命名
    }
}
